<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSocialsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('socials', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('名称');
            $table->string('type')->comment('类型');
            $table->string('redirect_url')->comment('跳转登录地址');
            $table->string('callback_url')->comment('回调地址');
            $table->string('appid')->comment('第三方APP id');
            $table->string('appkey')->comment('第三方秘钥');
            $table->string('icon')->nullable()->comment('图标');
            $table->string('color')->default('#448aff')->comment('背景色');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('socials');
    }
}
